package com.boang.encode;

import java.io.UnsupportedEncodingException;

/*
    @author:sa
    @date:2024/12/12 15:39
*/
public class Encode {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String str1="年";
        byte[] bytes = str1.getBytes("utf-8");
        for (int i = 0; i < bytes.length; i++) {
            System.out.println(bytes[i]);
        }
        byte[]bt={-27,-71,76};
        String str2= new String(bt,"GBK");
        System.out.println(str2);
    }
}